package com.dyna.controller;

import com.dyna.domain.resp.R;
import com.dyna.foundation.domain.resp.SysPermissionInfoResp;
import com.dyna.service.SysPermissionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(value = "权限模块")
@RestController
@RequestMapping("/permission")
public class SysPermissionController {

    @Resource
    private SysPermissionService sysPermissionService;

    @GetMapping("/get-permission-info")
    @ApiOperation(value = "获取登录用户的权限信息")
    public R<SysPermissionInfoResp> getPermissionInfo() {
        return R.data(sysPermissionService.getPermissionInfo());
    }

}
